<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>社交活动平台 - 帮助与反馈</title>
    <style>
        /* 重置样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }

        /* 容器样式 */
        .container {
            max-width: 480px;
            margin: 0 auto;
            background-color: #fff;
            min-height: 100vh;
        }

        /* 头部导航 */
        .header {
            position: sticky;
            top: 0;
            background-color: white;
            padding: 16px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            z-index: 100;
        }

        .header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .back-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #333;
        }

        .header-title {
            font-size: 18px;
            font-weight: bold;
            flex-grow: 1;
            text-align: center;
        }

        .action-btn {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #333;
        }

        /* 帮助中心头部 */
        .help-header {
            padding: 24px 16px;
            text-align: center;
            background: linear-gradient(135deg, #45b7d1 0%, #2c8cb9 100%);
            color: white;
        }

        .help-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 8px;
        }

        .help-description {
            font-size: 14px;
            opacity: 0.9;
        }

        /* 帮助中心内容 */
        .help-content {
            padding: 20px 16px;
        }

        /* 帮助分类 */
        .help-categories {
            margin-bottom: 30px;
        }

        .category-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }

        .category-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .category-item {
            background-color: #f9f9f9;
            border-radius: 12px;
            padding: 20px 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .category-item:hover {
            background-color: #e9f7fe;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        .category-icon {
            font-size: 32px;
            margin-bottom: 12px;
        }

        .category-name {
            font-size: 16px;
            font-weight: bold;
        }

        /* 常见问题 */
        .faq-section {
            margin-bottom: 30px;
        }

        .faq-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }

        .faq-item {
            margin-bottom: 16px;
            border-radius: 12px;
            overflow: hidden;
        }

        .faq-question {
            padding: 16px;
            background-color: #f9f9f9;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .faq-answer {
            padding: 16px;
            background-color: #fff;
            border-top: 1px solid #eee;
            display: none;
        }

        .faq-answer.show {
            display: block;
        }

        .faq-toggle {
            transition: transform 0.3s ease;
        }

        .faq-toggle.rotated {
            transform: rotate(180deg);
        }

        /* 反馈建议 */
        .feedback-section {
            margin-bottom: 30px;
        }

        .feedback-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }

        .feedback-options {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .feedback-option {
            display: flex;
            align-items: center;
            padding: 16px;
            background-color: #f9f9f9;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .feedback-option:hover {
            background-color: #e9f7fe;
        }

        .feedback-icon {
            font-size: 24px;
            margin-right: 16px;
            color: #ff6b35;
        }

        .feedback-text {
            flex-grow: 1;
        }

        .feedback-name {
            font-weight: bold;
            margin-bottom: 4px;
        }

        .feedback-description {
            font-size: 14px;
            color: #666;
        }

        /* 联系我们 */
        .contact-section {
            margin-bottom: 30px;
        }

        .contact-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #333;
        }

        .contact-info {
            background-color: #f9f9f9;
            border-radius: 12px;
            padding: 20px;
        }

        .contact-item {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
        }

        .contact-item:last-child {
            border-bottom: none;
        }

        .contact-icon {
            font-size: 20px;
            margin-right: 16px;
            color: #45b7d1;
        }

        .contact-details {
            flex-grow: 1;
        }

        .contact-label {
            font-weight: bold;
            margin-bottom: 4px;
        }

        .contact-value {
            font-size: 14px;
            color: #666;
        }

        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: white;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: space-around;
            padding: 12px 0;
            z-index: 100;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #9e9e9e;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .nav-item.active {
            color: #ff6b35;
        }

        .nav-icon {
            font-size: 20px;
            margin-bottom: 4px;
        }

        /* 加载动画 */
        .loading {
            text-align: center;
            padding: 40px 20px;
        }

        .spinner {
            width: 36px;
            height: 36px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #ff6b35;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: white;
            border-radius: 16px;
            width: 85%;
            max-width: 320px;
            padding: 24px;
            text-align: center;
            transform: translateY(20px);
            opacity: 0;
            transition: all 0.3s ease;
        }

        .modal.show {
            transform: translateY(0);
            opacity: 1;
        }

        .modal-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 16px;
            color: #333;
        }

        .modal-message {
            margin-bottom: 24px;
            color: #666;
            line-height: 1.6;
        }

        .modal-actions {
            display: flex;
            gap: 12px;
        }

        .modal-btn {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .cancel-btn {
            background-color: #f5f5f5;
            color: #666;
        }

        .confirm-btn {
            background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
        }

        /* 响应式适配 */
        @media (max-width: 480px) {
            .header-content {
                padding-top: 4px;
            }
            
            .category-grid {
                grid-template-columns: 1fr;
            }
        }

        /* 动画效果 */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .category-item, .faq-item {
            animation: fadeInUp 0.6s ease forwards;
        }

        /* 图标样式 */
        .icon-help { color: #45b7d1; }
        .icon-faq { color: #ff6b35; }
        .icon-feedback { color: #4caf50; }
        .icon-contact { color: #9c27b0; }
        .icon-suggestion { color: #ff9800; }

        /* 反馈表单 */
        .feedback-form {
            display: none;
            background-color: #f9f9f9;
            border-radius: 12px;
            padding: 20px;
            margin-top: 16px;
        }

        .feedback-form.show {
            display: block;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            font-weight: bold;
            margin-bottom: 8px;
            display: block;
        }

        .form-input {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #ddd;
            font-size: 14px;
        }

        .form-textarea {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #ddd;
            font-size: 14px;
            min-height: 100px;
            resize: vertical;
        }

        .submit-btn {
            width: 100%;
            background: linear-gradient(135deg, #45b7d1 0%, #2c8cb9 100%);
            color: white;
            border: none;
            padding: 12px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .submit-btn:hover {
            transform: scale(1.02);
        }

        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-icon {
            font-size: 48px;
            margin-bottom: 20px;
            color: #ccc;
        }

        .empty-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 12px;
            color: #666;
        }

        .empty-description {
            color: #999;
            margin-bottom: 24px;
        }

        /* 反馈成功提示 */
        .success-message {
            display: none;
            background-color: #e8f5e9;
            color: #388e3c;
            padding: 16px;
            border-radius: 8px;
            margin-top: 16px;
            text-align: center;
        }

        .success-message.show {
            display: block;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部导航 -->
        <header class="header">
            <div class="header-content">
                <button class="back-btn" id="backBtn">←</button>
                <div class="header-title">帮助与反馈</div>
                <button class="action-btn" id="searchBtn">🔍</button>
            </div>
        </header>

        <!-- 帮助中心头部 -->
        <div class="help-header">
            <h1 class="help-title">帮助中心</h1>
            <p class="help-description">遇到问题？我们为您提供全面的帮助支持</p>
        </div>

        <!-- 帮助中心内容 -->
        <div class="help-content">
            <!-- 帮助分类 -->
            <div class="help-categories">
                <h2 class="category-title">帮助分类</h2>
                <div class="category-grid">
                    <div class="category-item" data-category="faq">
                        <span class="category-icon">❓</span>
                        <div class="category-name">常见问题</div>
                    </div>
                    <div class="category-item" data-category="account">
                        <span class="category-icon">👤</span>
                        <div class="category-name">账户相关</div>
                    </div>
                    <div class="category-item" data-category="activity">
                        <span class="category-icon">📅</span>
                        <div class="category-name">活动管理</div>
                    </div>
                    <div class="category-item" data-category="privacy">
                        <span class="category-icon">🔒</span>
                        <div class="category-name">隐私安全</div>
                    </div>
                </div>
            </div>

            <!-- 常见问题 -->
            <div class="faq-section">
                <h2 class="faq-title">常见问题</h2>
                <div class="faq-item">
                    <div class="faq-question">
                        <span>如何发布活动？</span>
                        <span class="faq-toggle">▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>在首页点击"发布"按钮，填写活动信息后即可发布。请确保提供准确的时间、地点和详细描述。</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>如何报名参加活动？</span>
                        <span class="faq-toggle">▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>浏览活动列表，点击感兴趣活动进入详情页，点击"报名参加"按钮即可。部分活动需要审核通过后才能参与。</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>如何联系客服？</span>
                        <span class="faq-toggle">▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>您可以通过"联系我们"页面的客服热线或在线聊天功能联系我们的客服团队。工作时间：周一至周日 9:00-21:00。</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>活动安全如何保障？</span>
                        <span class="faq-toggle">▼</span>
                    </div>
                    <div class="faq-answer">
                        <p>我们建立了完善的安全机制，包括实名认证、活动审核和用户举报系统。所有活动都经过严格审核，确保参与者安全。</p>
                    </div>
                </div>
            </div>

            <!-- 反馈建议 -->
            <div class="feedback-section">
                <h2 class="feedback-title">反馈与建议</h2>
                <div class="feedback-options">
                    <div class="feedback-option" data-type="bug">
                        <span class="feedback-icon">🐛</span>
                        <div class="feedback-text">
                            <div class="feedback-name">报告问题</div>
                            <div class="feedback-description">发现应用bug或功能异常</div>
                        </div>
                    </div>
                    
                    <div class="feedback-option" data-type="suggestion">
                        <span class="feedback-icon">💡</span>
                        <div class="feedback-text">
                            <div class="feedback-name">功能建议</div>
                            <div class="feedback-description">对应用功能的改进建议</div>
                        </div>
                    </div>
                    
                    <div class="feedback-option" data-type="complaint">
                        <span class="feedback-icon">⚠️</span>
                        <div class="feedback-text">
                            <div class="feedback-name">投诉举报</div>
                            <div class="feedback-description">对不当内容或行为的举报</div>
                        </div>
                    </div>
                    
                    <div class="feedback-option" data-type="praise">
                        <span class="feedback-icon">👍</span>
                        <div class="feedback-text">
                            <div class="feedback-name">表扬感谢</div>
                            <div class="feedback-description">对服务或功能的肯定和感谢</div>
                        </div>
                    </div>
                </div>
                
                <!-- 反馈表单 -->
                <div class="feedback-form" id="feedbackForm">
                    <h3>提交反馈</h3>
                    <div class="form-group">
                        <label class="form-label">反馈类型</label>
                        <select class="form-input" id="feedbackType">
                            <option value="">请选择反馈类型</option>
                            <option value="bug">报告问题</option>
                            <option value="suggestion">功能建议</option>
                            <option value="complaint">投诉举报</option>
                            <option value="praise">表扬感谢</option>
                        </select>
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">标题</label>
                        <input type="text" class="form-input" id="feedbackTitle" placeholder="简要描述您的反馈">
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">详细描述</label>
                        <textarea class="form-textarea" id="feedbackDescription" placeholder="详细描述您的问题或建议..."></textarea>
                    </div>
                    
                    <button class="submit-btn" id="submitFeedback">提交反馈</button>
                </div>
                
                <!-- 反馈成功提示 -->
                <div class="success-message" id="successMessage">
                    感谢您的反馈！我们会在24小时内处理并回复您。
                </div>
            </div>

            <!-- 联系我们 -->
            <div class="contact-section">
                <h2 class="contact-title">联系我们</h2>
                <div class="contact-info">
                    <div class="contact-item">
                        <span class="contact-icon">📞</span>
                        <div class="contact-details">
                            <div class="contact-label">客服热线</div>
                            <div class="contact-value">400-888-8888</div>
                        </div>
                    </div>
                    
                    <div class="contact-item">
                        <span class="contact-icon">💬</span>
                        <div class="contact-details">
                            <div class="contact-label">在线客服</div>
                            <div class="contact-value">工作时间 9:00-21:00</div>
                        </div>
                    </div>
                    
                    <div class="contact-item">
                        <span class="contact-icon">✉️</span>
                        <div class="contact-details">
                            <div class="contact-label">邮箱支持</div>
                            <div class="contact-value">support@socialcircle.com</div>
                        </div>
                    </div>
                    
                    <div class="contact-item">
                        <span class="contact-icon">📍</span>
                        <div class="contact-details">
                            <div class="contact-label">公司地址</div>
                            <div class="contact-value">北京市朝阳区科技大厦10层</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部导航 -->
        <nav class="bottom-nav">
            <div class="nav-item" data-page="home">
                <span class="nav-icon">🏠</span>
                <span>首页</span>
            </div>
            <div class="nav-item" data-page="search">
                <span class="nav-icon">🔍</span>
                <span>搜索</span>
            </div>
            <div class="nav-item" data-page="publish">
                <span class="nav-icon">➕</span>
                <span>发布</span>
            </div>
            <div class="nav-item active" data-page="profile">
                <span class="nav-icon">👤</span>
                <span>我的</span>
            </div>
        </nav>

        <!-- 加载状态 -->
        <div class="loading" id="loadingIndicator">
            <div class="spinner"></div>
            <p>加载帮助内容...</p>
        </div>

        <!-- 通知 Toast -->
        <div id="toast" style="display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background-color: #4caf50; color: white; padding: 12px 24px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1001;"></div>
    </div>

    <script>
        // 全局变量
        let currentFeedbackType = null;

        // 初始化
        document.addEventListener('DOMContentLoaded', function() {
            initEventListeners();
            simulateLoading();
            
            // 模拟加载帮助内容
            setTimeout(() => {
                hideLoading();
            }, 1500);
        });

        // 初始化事件监听器
        function initEventListeners() {
            // 返回按钮
            document.getElementById('backBtn').addEventListener('click', function() {
                window.history.back();
            });

            // 搜索按钮
            document.getElementById('searchBtn').addEventListener('click', function() {
                alert('跳转到搜索帮助内容');
            });

            // 底部导航切换
            const navItems = document.querySelectorAll('.nav-item');
            navItems.forEach(item => {
                item.addEventListener('click', function() {
                    // 移除所有激活状态
                    navItems.forEach(i => i.classList.remove('active'));
                    // 添加当前激活状态
                    this.classList.add('active');
                    
                    const page = this.dataset.page;
                    handleNavigation(page);
                });
            });

            // 帮助分类点击
            const categoryItems = document.querySelectorAll('.category-item');
            categoryItems.forEach(item => {
                item.addEventListener('click', function() {
                    const category = this.dataset.category;
                    alert(`跳转到${this.querySelector('.category-name').textContent}分类`);
                });
            });

            // 常见问题展开/收起
            const faqQuestions = document.querySelectorAll('.faq-question');
            faqQuestions.forEach(question => {
                question.addEventListener('click', function() {
                    const answer = this.nextElementSibling;
                    const toggleIcon = this.querySelector('.faq-toggle');
                    
                    if (answer.classList.contains('show')) {
                        answer.classList.remove('show');
                        toggleIcon.classList.remove('rotated');
                    } else {
                        // 关闭其他答案
                        document.querySelectorAll('.faq-answer.show').forEach(ans => {
                            ans.classList.remove('show');
                            ans.previousElementSibling.querySelector('.faq-toggle').classList.remove('rotated');
                        });
                        
                        answer.classList.add('show');
                        toggleIcon.classList.add('rotated');
                    }
                });
            });

            // 反馈选项点击
            const feedbackOptions = document.querySelectorAll('.feedback-option');
            feedbackOptions.forEach(option => {
                option.addEventListener('click', function() {
                    const type = this.dataset.type;
                    currentFeedbackType = type;
                    
                    // 显示反馈表单
                    const form = document.getElementById('feedbackForm');
                    form.classList.add('show');
                    
                    // 设置反馈类型
                    const typeSelect = document.getElementById('feedbackType');
                    if (typeSelect) {
                        typeSelect.value = type;
                    }
                    
                    // 滚动到表单
                    form.scrollIntoView({ behavior: 'smooth' });
                });
            });

            // 提交反馈
            document.getElementById('submitFeedback').addEventListener('click', function() {
                const type = document.getElementById('feedbackType').value;
                const title = document.getElementById('feedbackTitle').value;
                const description = document.getElementById('feedbackDescription').value;
                
                if (!type || !title || !description) {
                    showSuccessToast('请填写所有必填项');
                    return;
                }
                
                // 模拟提交反馈
                showSuccessToast('反馈已提交，感谢您的支持！');
                
                // 显示成功提示
                const successMessage = document.getElementById('successMessage');
                successMessage.classList.add('show');
                
                // 清空表单
                document.getElementById('feedbackType').value = '';
                document.getElementById('feedbackTitle').value = '';
                document.getElementById('feedbackDescription').value = '';
                
                // 隐藏表单
                setTimeout(() => {
                    const form = document.getElementById('feedbackForm');
                    form.classList.remove('show');
                    successMessage.classList.remove('show');
                }, 3000);
            });

            // 模拟帮助内容更新
            setInterval(() => {
                updateHelpContent();
            }, 60000); // 每分钟更新一次
        }

        // 更新帮助内容（模拟）
        function updateHelpContent() {
            // 这里可以添加动态更新帮助内容的逻辑
        }

        // 处理导航切换
        function handleNavigation(page) {
            switch(page) {
                case 'home':
                    alert('跳转到首页');
                    break;
                case 'search':
                    alert('跳转到搜索页面');
                    break;
                case 'publish':
                    alert('跳转到发布页面');
                    break;
                case 'profile':
                    // 个人中心无需特殊处理
                    break;
            }
        }

        // 显示加载状态
        function showLoading() {
            const loading = document.getElementById('loadingIndicator');
            loading.style.display = 'block';
        }

        // 隐藏加载状态
        function hideLoading() {
            const loading = document.getElementById('loadingIndicator');
            loading.style.display = 'none';
        }

        // 模拟加载效果
        function simulateLoading() {
            showLoading();
            setTimeout(() => {
                hideLoading();
            }, 1500);
        }

        // 显示成功提示
        function showSuccessToast(message) {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.style.display = 'block';
            
            // 3秒后自动隐藏
            setTimeout(() => {
                toast.style.display = 'none';
            }, 3000);
        }

        // 添加触摸反馈效果
        const buttons = document.querySelectorAll('button, .category-item, .faq-question, .feedback-option');
        buttons.forEach(button => {
            button.addEventListener('touchstart', function() {
                this.style.transform = 'scale(0.98)';
            });
            
            button.addEventListener('touchend', function() {
                this.style.transform = 'scale(1)';
            });
        });

        // 添加页面滚动效果
        let lastScrollTop = 0;
        window.addEventListener('scroll', function() {
            const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
            
            // 隐藏/显示底部导航
            const bottomNav = document.querySelector('.bottom-nav');
            if (scrollTop > lastScrollTop && scrollTop > 100) {
                bottomNav.style.transform = 'translateY(100%)';
            } else {
                bottomNav.style.transform = 'translateY(0)';
            }
            
            lastScrollTop = scrollTop;
        });

        // 添加返回顶部功能
        window.addEventListener('scroll', function() {
            if (window.pageYOffset > 300) {
                // 可以添加返回顶部按钮
            }
        });
    </script>
</body>
</html>
